Skip to content

feat(pulse-sdk-solidity): Create Pulse solidity SDK #2667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

tejasbadadare
Copy link
Contributor

@tejasbadadare tejasbadadare commented May 8, 2025

Summary

  • Extract public interfaces, data structures, and ABIs from the Pulse contracts out into an SDK. Now the Scheduler contract implements the IScheduler interface from the SDK.
  • Add quickstart docs in README.md
  • Fix abi_generator script to handle non-path imports

Rationale

This makes it possible for other services and contracts to easily interact with the Pulse protocol and consume its ABIs.

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

Will manually test installing and using the package from NPM after this gets merged and published. Locally installing and using the SDK in contracts works fine.

@tejasbadadare tejasbadadare requested a review from a team as a code owner May 8, 2025 22:47
Copy link

vercel bot commented May 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 8:45pm
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 8:45pm
entropy-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 8:45pm
entropy-explorer ❌ Failed (Inspect) May 12, 2025 8:45pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 8:45pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 8:45pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 8:45pm

Comment on lines +51 to +52
// We can still generate ABIs with warnings, only throw for errors
const errors = output.errors.filter((e) => e.severity === "error");
Copy link
Contributor Author

@tejasbadadare tejasbadadare May 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI i excluded warnings due to this warning in PythAggregatorV3.sol blocking the precommit for the Pulse SDK. Turns out there is no simple way to disable solc warnings for a single line/file 🙃

image

We should enforce warnings somewhere else anyway, probably turbo test:lint and/or CI

Copy link
Collaborator

@ali-bahjati ali-bahjati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend you add the signatures for these as well. (you can use cast sig)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants